//
//  LTMessageAtTextBody.m
//  LTChat
//
//  Created by 俊松何 on 2017/9/14.
//  Copyright © 2017年 俊松何. All rights reserved.
//

#import "LTMessageAtTextBody.h"
#import "LTClient.h"

@implementation LTMessageAtTextBody
-(instancetype)initWithText:(NSString *)text userIds:(NSArray *)userIds
{
    if(self = [super init])
    {
        _text = text;
        _atUserIds = userIds;
    
    }
    return self;
}

-(BOOL)atHaveMe
{
    for (NSString *userId in _atUserIds) {
        if([userId isEqualToString:[LTClient sharedClient].currentUserId])
        {
            return YES;
        }
    }
    return NO;
}

@end
